<%@ page language="java"
	import="java.util.*,org.yoao.crm.tools.TimeTool" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	String method = (String) request.getParameter("method");
	String value = (String) request.getParameter("v");
	String id = (String) request.getParameter("id");
	String cusromerId = (String) request.getParameter("cid");
	String type = (String) request.getParameter("t");

	String action = basePath + "customer.crm?method=" + method;
	if ("sign".equals(method)) {
		action = basePath + "customerAttributes.crm?method=" + method;
	}
	String title = "签到客户-签到日期";
	if ("type".equals(method)) {
		title = "分配类型-类型选择";
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title><%=title%></title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<jsp:include page="../public/publicJs.jsp" flush="false"></jsp:include>
		<SCRIPT Language="Javascript" SRC="<%=basePath%>js/json/json2.js"></SCRIPT>
		<SCRIPT Language="Javascript" SRC="<%=basePath%>js/json/json.js"></SCRIPT>
		<script src="<%=basePath%>/js/calendar.js">
</script>
	</head>
	<base target="_self" />
	<body text="#000000" bgcolor="#FFFFFF" TOPMARGIN="0" LEFTMARGIN="0"
		style="overflow-y: hidden; border: 1px solid #8DB2E3;">
		<form action="<%=action%>" method="post" name="form1">
			<input type="hidden" name="id" value="<%=id%>" />
			<input type="hidden" name="cid" value="<%=cusromerId%>" />
			<input type="hidden" name="v" value="<%=value%>" />
			<table class="title_top" width=100% align=center border="0"
				cellspacing="0" cellpadding="0">
				<tr valign="top" class="tree_title_txt">
					<td class="tree_title_txt" width=100% height=26 align=center
						valign="middle"><%=title%></td>
				</tr>
				<tr valign="top">
					<td>
						<div class="tabBody"
							style="margin: 12px; padding: 12px; height: 200px">
							<%
								if ("type".equals(method)) {
							%>
							<table class="maintab_content_table" align="center" border="0"
								width="98%" cellspacing="0" cellpadding="0">
								<tr>
									<td valign="top" width="25%">
										类型：
									</td>
									<td width="80%">
										<select name="type" id="type" style="width: 150px">
											<option />
											<option value="A" />
												A型
												<option value="B" />
													B型
													<option value="C" />
														C型
														<option value="D" />
															D型
										</select>
									</td>
								</tr>
								<tr>
									<td colspan="2" align="left">
										<span id="msg" style="text-align: left; width: 100%"></span>
									</td>
								</tr>
							</table>
							<%
								} else {
							%>
							<table class="maintab_content_table" align="center" border="0"
								width="98%" cellspacing="0" cellpadding="0">
								<tr>
									<td valign="top" width="20%">
										签到日期：
									</td>
									<td width="80%">
										<input name="signTime" style="width: 150px" class="text_220"
											type="text" size="15" readonly maxlength="10"
											value="<%=TimeTool.getSystemDate()%>" />
										<img <%if ("0".equals(value)) {%> disabled <%}%>
											onClick="calendar('', 'signTime');return false"
											style="cursor: pointer;"
											src="<%=basePath%>images/tbtn_overtime.gif" width="20"
											height="19" border="0" align="absmiddle">
									</td>
								</tr>

								<tr>
									<td valign="top" width="25%">
										签到类别：
									</td>
									<td width="80%">
										<select name="state" id="state" style="width: 150px"
											<%if ("sign".equals(method)) {%> disabled <%}%>>
											<option />
										</select>
									</td>
								</tr>
								<script>
var type = "<%=type%>";
var objSelect = document.getElementById("state");
var customerType = ajax_getReturnText(
		"<%=basePath%>customerType.crm?method=getType").parseJSON();
for ( var i = 0; i < customerType.length; i++) {
	var varItem = new Option(customerType[i].typeName, customerType[i].typeCode);
	objSelect.options.add(varItem);
	if (objSelect.options[i].value == type) {
		objSelect.options[i].selected = true;
	}
}
</script>
								<tr>
									<td colspan="2" align="left">
										<span id="msg" style="text-align: left; width: 100%"></span>
									</td>
								</tr>
							</table>
							<%
								}
							%>
						</div>
						<div style="margin: 12px" align="right">
							<table border="0" cellspacing="0" cellpadding="0">
								<tr valign="top">
									<td id="btnCancel" valign="middle" align="right" width="50%">
										<input name="bup" type="submit" value="确定"
											class="btn3_mouseout" style="margin-right: 0px">
									</td>
									<td id="btnCancel" valign="middle" align="left" width="50%">
										&nbsp;&nbsp;
										<button onClick="window.close()" class="btn3_mouseout">
											关闭
										</button>
									</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>